# coding:utf-8
# *******************************************************************
# * Copyright 2021-2080 evilbinary
# * 作者: evilbinary on 01/01/20
# * 邮箱: rootdebug@163.com
# ********************************************************************
import os

from xenv.config import CFLAGS

Import('env')

gcc_env = Environment(CC='gcc-mp-8',tools=['default'],ENV=os.environ)

env.GenerateKernelSize('config.h',['../../duck/init/kernel'])

gcc_env.ParseConfig('sdl2-config --cflags --libs')

CFLAGS=' -m32 -g -D'+env['ARCHTYPE'].upper()
CC_LIB_PATH= env['CC_LIB_PATH']

gcc_env.Program('init.elf', ['init.c',
# CC_LIB_PATH+'libgcc.a'
],CFLAGS='$CFLAGS -I. -Iinclude  -Iarch -std=c99 -std=gnu99 -w  '+CFLAGS,
LINKFLAGS='$LINKFLAGS '+CFLAGS)
